home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / arcid100.zip / PCBTEST.BAT < prev    next >
DOS Batch File  |  1992-09-18  |  2KB  |  109 lines

  1. @Echo off
  2. cls
  3.  
  4. del pcbpass.txt
  5. del pcbfail.txt
  6.  
  7. ARCID %1 ARC ARJ HYP LZH PAK ZIP ZOO GIF
  8. if errorlevel 98 goto UNKNOWN
  9. if errorlevel 8  goto GIF_TESTING
  10. if errorlevel 7  goto ZOO_TESTING
  11. if errorlevel 6  goto ZIP_TESTING
  12. if errorlevel 5  goto PAK_TESTING
  13. if errorlevel 4  goto LZH_TESTING
  14. if errorlevel 3  goto HYP_TESTING
  15. if errorlevel 2  goto ARJ_TESTING
  16. if errorlevel 1  goto ARC_TESTING
  17.  
  18. Echo ERROR: ARCID critical error...please notify sysop! > pcbfail.txt
  19. exit
  20.  
  21. :UNKNOWN
  22. Echo ERROR: Unknown file format! > pcbfail.txt
  23. exit
  24.  
  25. :ARC_TESTING
  26. md testing
  27. cd testing
  28. pkunpak -r %1
  29. if not errorlevel 0 goto ERROR1
  30. scan /a /nomem /nopause *.*
  31. if not errorlevel 0 goto ERROR2
  32. goto OK
  33.  
  34. :ARJ_TESTING
  35. md testing
  36. cd testing
  37. arj e -y %1
  38. if not errorlevel 0 goto ERROR1
  39. scan /a /nomem /nopause *.*
  40. if not errorlevel 0 goto ERROR2
  41. goto OK
  42.  
  43. :HYP_TESTING
  44. md testing
  45. cd testing
  46. hyper -x %1
  47. if not errorlevel 0 goto ERROR1
  48. scan /a /nomem /nopause *.*
  49. if not errorlevel 0 goto ERROR2
  50. goto OK
  51.  
  52. :LZH_TESTING
  53. md testing
  54. cd testing
  55. lha e /m1 %1
  56. if not errorlevel 0 goto ERROR1
  57. scan /a /nomem /nopause *.*
  58. if not errorlevel 0 goto ERROR2
  59. goto OK
  60.  
  61. :PAK_TESTING
  62. md testing
  63. cd testing
  64. pak e /wa %1
  65. if not errorlevel 0 goto ERROR1
  66. scan /a /nomem /nopause *.*
  67. if not errorlevel 0 goto ERROR2
  68. goto OK
  69.  
  70. :ZIP_TESTING
  71. md testing
  72. cd testing
  73. pkunzip -o %1
  74. if not errorlevel 0 goto ERROR1
  75. scan /a /nomem /nopause *.*
  76. if not errorlevel 0 goto ERROR2
  77. goto OK
  78.  
  79. :ZOO_TESTING
  80. md testing
  81. cd testing
  82. zoo e %1
  83. if not errorlevel 0 goto ERROR1
  84. scan /a /nomem /nopause *.*
  85. if not errorlevel 0 goto ERROR2
  86. goto OK
  87.  
  88. :GIF_TESTING
  89. giftest /b:0 %1
  90. if not errorlevel 0 goto ERROR1
  91.  
  92. :OK
  93. cd ..
  94. echo y|del testing\*.*
  95. rd testing
  96. Echo File passed all tests... > pcbpass.txt
  97. exit
  98.  
  99. :ERROR1
  100. echo y|del testing\*.*
  101. rd testing
  102. Echo ERROR: File failed integrity test... > pcbfail.txt
  103. exit
  104.  
  105. :ERROR2
  106. echo y|del testing\*.*
  107. rd testing
  108. Echo ERROR: File failed virus test... > pcbfail.txt
  109.